@extends('admin::layouts.master')
@section('title')
    服务订单
@endsection
@section('tab')
    <style>

    </style>
    <div class="x-nav">
            <span class="layui-breadcrumb">
                <a href="">首页</a>
                <a href="">订单管理</a>
                <a><cite>订单列表</cite></a>
            </span>
        <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right"
           onclick="location.reload()" title="刷新">
            <i class="layui-icon layui-icon-refresh" style="line-height:30px"></i>
        </a>
    </div>
    <div class="layui-fluid">
        <div class="layui-row layui-col-space15">
            <div class="layui-col-md12">
                <div class="layui-card">
                    <div class="layui-card-body">
                        <form class="layui-form layui-col-space5">
                            <div class="layui-input-inline layui-show-xs-block">
                                <input type="text" name="order_number" placeholder="订单号"
                                       value="{{$arr_search['order_number']}}" autocomplete="off" class="layui-input">
                            </div>
                            <div class="layui-input-inline layui-show-xs-block">
                                <select name="order_type">
                                    <option value="">订单类型</option>
                                    <option value="1" @if($arr_search['order_type']=='1') selected @endif>自驾</option>
                                    <option value="2" @if($arr_search['order_type']=='2') selected @endif>代驾</option>
                                </select>
                            </div>

                            <div class="layui-input-inline layui-show-xs-block">
                                <select name="pay_status">
                                    <option value="" >支付状态</option>
                                    <option value="0" @if($arr_search['pay_status']==='0') selected @endif>待支付</option>
                                    <option value="1" @if($arr_search['pay_status']=='1') selected @endif>已支付</option>
                                    <option value="2" @if($arr_search['pay_status']=='2') selected @endif>申请退款</option>
                                    <option value="3" @if($arr_search['pay_status']=='3') selected @endif>已退款</option>
                                </select>
                            </div>

                            <div class="layui-input-inline layui-show-xs-block">
                                <select name="status">
                                    <option value="" >订单状态</option>
                                    <option value="0" @if($arr_search['status']==='0') selected @endif>待检修</option>
                                    <option value="1" @if($arr_search['status']=='1') selected @endif>已检修</option>
                                    <option value="2" @if($arr_search['status']=='2') selected @endif>取消订单</option>
                                    <option value="3" @if($arr_search['status']=='3') selected @endif>已评价</option>
                                    <option value="4" @if($arr_search['status']=='4') selected @endif>已关闭</option>
                                </select>
                            </div>

                            <div class="layui-input-inline layui-show-xs-block">
                                <button class="layui-btn" lay-submit="" lay-filter="sreach">
                                    <i class="layui-icon">&#xe615;</i></button>
                            </div>
                        </form>
                    </div>
                    <div class="layui-card-body layui_overflow_y">
                        <table class="layui-table layui-form">
                            <thead>
                            <tr>
                                <th style="min-width: 40px">编号</th>
                                <th>订单编号</th>
                                <th>订单类型</th>
                                <th>服务类型</th>
                                <th>服务名称</th>
                                <th>订单金额</th>
                                <th>支付金额</th>
                                <th>支付状态</th>
                                <th>订单状态</th>
                                <th>下单时间</th>
                                <th>操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            @foreach($data as $key=>$value)
                                <tr>
                                    <td style="min-width: 40px">{{ $value['id'] }}</td>
                                    <td>{{$value['order_number']}}</td>
                                    <td>{{$value['order_type_msg']}}</td>
                                    <td>{{$value['gtype']['title'] }}</td>
                                    <td>{{$value['goods_name']}}</td>
                                    <td>￥{{$value['order_price']}}</td>
                                    <td>￥{{$value['pay_price']}}</td>
                                    <td>{{$value['pay_status_msg'] }}</td>
                                    <td>{{ $value['status_msg'] }}</td>
                                    <td>{{$value['created_at']}}</td>
                                    <td>
                                        <a title="订单详情" onclick="xadmin.open('订单详情','{{route('admin_order_repairstore_detail',['id'=>$value['id']])}}')" href="javascript:;">
                                            详情
                                        </a>
                                        <a title="删除" class="ajax_member_del" data-href="{{route('admin_order_repairstore_del',['id'=>$value['id']])}}" data-title="确定删除吗？请谨慎操作" href="javascript:;">
                                            删除
                                        </a>
                                    </td>
                                </tr>
                            @endforeach
                            @if(empty($data))
                                <td colspan="66" align="center">暂无数据</td>
                            @endif
                            </tbody>
                        </table>
                    </div>
                    <div class="layui-card-body ">
                        <div class="page">
                            {{$page_link}}
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

@endsection


@section('tab_js')
    <script>


    </script>
@endsection




